<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>	
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>我的展会</title>
<link rel="stylesheet" href="<%=path %>/css/bootstrap.css" />
<link rel="stylesheet" href="<%=path %>/css/css.css" />
<script type="text/javascript" src="<%=path %>/js/jquery1.9.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/sdmenu.js"></script>
<script type="text/javascript" src="<%=path %>/js/laydate/laydate.js"></script>
<script type="text/javascript">
	function del(id){
		if(confirm("是否删除该记录?")){
			alert("删除成功!");
			location="<%=path%>/host/exhinfoDelete.do?ehi_id="+id;
		}
	}
	function certain(id){
		if(confirm("是否启动招商?")){
			alert("操作成功!");
			location="<%=path%>/host/exhinfoCertain.do?ehi_id="+id;
		}
	}
	function start(id){
		if(confirm("是否启动展会?")){
			alert("启动成功!");
			location="<%=path%>/host/exhinfoStart.do?ehi_id="+id;
		}
	}
</script>
</head>
<body>
	<div class="right_cont">
		<ul class="breadcrumb">当前位置：我的展会<span class="divider">/</span></span>展会管理</ul>
	</div>
	<div class="title_right"><strong>展会管理</strong></div>
	
	<form action="<%=path %>/host/exhinfoList.do" id="form" method="post">
	<table class="table table-bordered" style="width:400px" align="center">
		<tr>
			<td width="20%" align="right" bgcolor="#f1f1f1">展会名称：</td>
			<td width="25%">
				<input type="text" name="ehi_name" value="${requestScope.ehi_name}" maxlength="20" class="span1-1" />
			</td>
			<td width="40%">
				<input type="submit" id="submit" value="搜索" class="btn btn-info " style="width: 80px;" />
			</td>
		</tr>
	</table>
	</form>
	
	<table width="90%" class="table table-bordered table-striped table-hover">
     <tbody>
       <tr align="center">
         <td width="15%" nowrap="nowrap"><strong>展会名称</strong></td>
         <td width="15%" nowrap="nowrap"><strong>场馆</strong></td>
         <td width="15%" nowrap="nowrap"><strong>批文号</strong></td>
         <td width="15%" nowrap="nowrap"><strong>开始时间</strong></td>
         <td width="15%" nowrap="nowrap"><strong>结束时间</strong></td>
         <td width="15%" nowrap="nowrap"><strong>展会地点</strong></td>
         <td width="15%" nowrap="nowrap"><strong>已邀请单位</strong></td>
         <td width="15%" nowrap="nowrap"><strong>接受邀请</strong></td>
         <td width="15%" nowrap="nowrap"><strong>展会状态</strong></td>
         <td width="25%" nowrap="nowrap"><strong>操作</strong></td>
        </tr>
       <c:forEach items="${requestScope.list}" var="exh">
       <tr align="center">
         <td nowrap="nowrap">${exh.ehi_name}</td>
         <td nowrap="nowrap">${exh.ven_name}</td>
         <td nowrap="nowrap">${exh.ehi_file_no} </td>
         <td nowrap="nowrap">${exh.ehi_start_time}</td>
         <td nowrap="nowrap">${exh.ehi_end_time} </td>
         <td nowrap="nowrap">${exh.ehi_address} </td>
         <td nowrap="nowrap"><a href="<%=path%>/host/inviteCountList.do?exh_id=${exh.ehi_id}">${exh.invate_count}</a></td>
         <td nowrap="nowrap"><a href="<%=path%>/host/joinCountList.do?exh_id=${exh.ehi_id}">${exh.join_count}</a></td>
         <td nowrap="nowrap">
         	<c:if test="${exh.ehi_state==1}"><font color="red">待确认</font></c:if>
         	<c:if test="${exh.ehi_state==2}"><font color="green">招商中...</font></c:if>
         	<c:if test="${exh.ehi_state==3}"><font color="orange">展会已启动</font></c:if>
         </td>
         <td nowrap="nowrap">
         <c:if test="${exh.ehi_state==1}">
         	<a href="<%=path%>/host/exhinfoUpdate.do?ehi_id=${exh.ehi_id}">编辑</a>|
         	<a href="javascript:void(0)" onclick="del('${exh.ehi_id}')">删除</a>|
         	<a href="javascript:void(0)" onclick="certain('${exh.ehi_id}')">启动招商</a>
         </c:if>
         <c:if test="${exh.ehi_state==2}">
         	<a href="<%=path%>/host/exhinfoDetail.do?ehi_id=${exh.ehi_id}">详情</a>|
         	<a href="<%=path%>/host/addInvite.do?ehi_id=${exh.ehi_id}">发送邀请函</a>|
         	<a href="javascript:void(0)" onclick="start('${exh.ehi_id}')">启动展会</a>
         </c:if>
         <c:if test="${exh.ehi_state==3}">
         	<a href="<%=path%>/host/exhinfoDetail.do?ehi_id=${exh.ehi_id}">详情</a>
         </c:if>
         </td>
       </tr>
      </c:forEach>
     </tbody>
   </table>
</body>
</html>